package com.yanqu.road.logic.bussiness.recharge;

import com.yanqu.road.entity.activity.coupon.CouponActivityUserData;
import com.yanqu.road.entity.player.UserCouponItem;
import com.yanqu.road.logic.bussiness.DaoHelper;

import java.util.Map;

public class CouponBussiness {
    public static long getMaxItemId(long userId) {
        return DaoHelper.getUserCouponItemDaoImpl().getMaxItemId(userId);
    }

    public static Map<Long, UserCouponItem> getUserCouponItemMap(long userId, long selectTime) {
        return DaoHelper.getUserCouponItemDaoImpl().getUserCouponItemMap(userId, selectTime);
    }

    public static int getCouponUsedCount(long userId){
        return DaoHelper.getUserCouponItemDaoImpl().getCouponUsedCount(userId);
    }

    public static boolean addUserCouponItem(UserCouponItem data) {
        return DaoHelper.getUserCouponItemDaoImpl().add(data);
    }

    public static boolean updateUserCouponItem(UserCouponItem data) {
        return DaoHelper.getUserCouponItemDaoImpl().update(data);
    }

    public static CouponActivityUserData getCouponActivityUserData(int activityId, long userId) {
        return DaoHelper.getCouponUserDataDaoImpl().getCouponActivityUserData(activityId, userId);
    }

    public static boolean addCouponActivityUserData(CouponActivityUserData data) {
        return DaoHelper.getCouponUserDataDaoImpl().add(data);
    }

    public static boolean updateCouponActivityUserData(CouponActivityUserData data) {
        return DaoHelper.getCouponUserDataDaoImpl().update(data);
    }
}
